{include file="default/header.tpl"}
			{literal}
			<script type="text/javascript">
				function getTinyURL( url )
				{
					$.get( "tinyurl.php", { u: url }, tinyURLCallback );
					document.getElementById( "tinyclick" ).style.display = "none";
					document.getElementById( "tinyload" ).style.display = "block";
				}
				
				function tinyURLCallback( data, textStatus )
				{
					document.getElementById( "tinyurl" ).innerHTML = data;
					document.getElementById( "tinyurl" ).style.cursor = "text";
					document.getElementById( "tinyload" ).style.display = "none";
				}
			</script>
			{/literal}
			{if isset( $snippit ) }
			<h1 style="margin-bottom: 0px">View Code - {$snippit.script}</h1>
			
			<div id="tinyurl">
				<div id="tinyload" style="display: none"><img src="{$config.baseurl}templates/default/images/ajaxind.gif" alt="Loading..." /></div>
				<div id="tinyclick" onclick="getTinyURL('{$config.baseurl}{$id}')">Generate TinyURL for this page</div>
			</div>
			
			<span class="langdate">{$langs[$snippit.lang]} - submitted by {$snippit.name} on {$date}</span>

			{if isset( $snippit.description ) }
			<p>{$snippit.description}</p>		
			{/if}
			
			{$code}
			
			{if $snippit.notes != "" }
			<h3>Notes</h3>
			<pre class="notes">{$snippit.notes}</pre>
			{/if}
			{if isset( $alts ) }
				<h3>Alterations to this script (most recent first)</h3>
				<ul>
				{foreach from=$alts key=key item=alt}
					<li><b><a href="{$config.baseurl}{$alt.sid}">{if $alt.script}{$alt.script}{else}Untitled code{/if}</a></b> by <b>{if $alt.name}{$alt.name}{else}Anonymous{/if}</b> <i>(posted {$alt.formatdate})</i></li>
				{/foreach}
				</ul>
			{/if}
			{else}
			<h1 style="color: red">Error</h1>
			<p>No code was found with the ID <b>#{$id}</b>. If you followed this link from another website, the code snippit most likely
			expired.</p>
			{/if}
	
			

{include file="default/footer.tpl"}